package com.omronservice;

import com.omronservice.jwt.Audience;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

import javax.servlet.Filter;
import javax.servlet.http.HttpSessionListener;

@EnableScheduling
@SpringBootApplication
@EnableConfigurationProperties(Audience.class)
@ServletComponentScan
public class OmronServiceApplication {


    public static void main(String[] args) {
        SpringApplication.run(OmronServiceApplication.class, args);
    }

    @Bean
    public HttpSessionListener javaMelodyListener(){
        return new net.bull.javamelody.SessionListener();
    }

    @Bean
    public Filter javaMelodyFilter(){
        return new net.bull.javamelody.MonitoringFilter();
    }

}
